#include "level_objects.h"
#include "stddef.h"

unsigned char data_levels_0_dat[] = {
  0x27, 0x00, 0x64, 0x0a, 0x00, 0x01, 0x00, 0x73, 0x0a, 0x00, 0x01, 0x00,
  0x82, 0x0a, 0x00, 0x01, 0x00, 0xa0, 0x15, 0x00, 0x01, 0x00, 0xaf, 0x15,
  0x00, 0x01, 0x00, 0xbe, 0x15, 0x00, 0x01, 0x00, 0xfa, 0x15, 0x00, 0x01,
  0x01, 0x06, 0x15, 0x00, 0x01, 0x01, 0x09, 0x20, 0x00, 0x01, 0x01, 0x18,
  0x20, 0x00, 0x01, 0x01, 0x27, 0x0a, 0x00, 0x01, 0x01, 0x27, 0x20, 0x00,
  0x01, 0x01, 0x34, 0x0a, 0xff, 0x01, 0x01, 0x40, 0x0a, 0x00, 0x01, 0x01,
  0x7c, 0x0a, 0x01, 0x02, 0x01, 0x8b, 0x20, 0x01, 0x00, 0x01, 0x9a, 0x0a,
  0x01, 0x02, 0x01, 0xa9, 0x20, 0x01, 0x00, 0x01, 0xb8, 0x0a, 0x01, 0x02,
  0x01, 0xc7, 0x20, 0x01, 0x00, 0x01, 0xd6, 0x0a, 0x01, 0x02, 0x01, 0xe5,
  0x20, 0x01, 0x00, 0x02, 0x26, 0x20, 0x02, 0x01, 0x02, 0x44, 0x0a, 0x02,
  0x01, 0x02, 0x53, 0x0a, 0x02, 0x01, 0x02, 0x6c, 0x15, 0x02, 0x01, 0x02,
  0x7b, 0x15, 0x02, 0x01, 0x02, 0x8a, 0x15, 0x02, 0x01, 0x02, 0x99, 0x15,
  0x02, 0x01, 0x02, 0xa8, 0x0a, 0x02, 0x01, 0x02, 0xb7, 0x0a, 0x02, 0x01,
  0x02, 0xc6, 0x0a, 0x02, 0x01, 0x02, 0xd5, 0x0a, 0x02, 0x01, 0x02, 0xf8,
  0x1a, 0xff, 0x01, 0x03, 0x57, 0x0a, 0x03, 0x01, 0x03, 0x6b, 0x23, 0x03,
  0x01, 0x03, 0x7a, 0x12, 0x03, 0x01, 0x03, 0x84, 0x0a, 0x03, 0x01, 0x03,
  0xa2, 0x0a, 0x04, 0x02
};
unsigned int data_levels_0_dat_len = 196;
unsigned char data_levels_1_dat[] = {
  0x26, 0x00, 0x64, 0x0a, 0x01, 0x02, 0x00, 0x64, 0x20, 0x01, 0x00, 0x00,
  0x6e, 0x0a, 0x01, 0x02, 0x00, 0x6e, 0x20, 0x01, 0x00, 0x00, 0x78, 0x0a,
  0x01, 0x02, 0x00, 0x78, 0x20, 0x01, 0x00, 0x00, 0x82, 0x15, 0xff, 0x01,
  0x00, 0xa0, 0x07, 0x05, 0x02, 0x00, 0xa0, 0x1d, 0x06, 0x02, 0x00, 0xaa,
  0x0a, 0x05, 0x02, 0x00, 0xaa, 0x20, 0x06, 0x02, 0x00, 0xb4, 0x0d, 0x05,
  0x02, 0x00, 0xb4, 0x23, 0x06, 0x02, 0x00, 0xdc, 0x0f, 0x07, 0x02, 0x00,
  0xf0, 0x0f, 0x07, 0x02, 0x01, 0x04, 0x1e, 0x08, 0x02, 0x01, 0x18, 0x18,
  0x02, 0x01, 0x01, 0x2c, 0x0c, 0x02, 0x01, 0x01, 0x54, 0x18, 0x02, 0x01,
  0x01, 0x5e, 0x0c, 0x02, 0x01, 0x01, 0x68, 0x08, 0x02, 0x01, 0x01, 0x68,
  0x24, 0x02, 0x01, 0x01, 0x90, 0x18, 0x02, 0x01, 0x01, 0xa4, 0x24, 0x02,
  0x01, 0x01, 0xb8, 0x08, 0x02, 0x01, 0x01, 0xb8, 0x24, 0x02, 0x01, 0x01,
  0xd6, 0x18, 0x03, 0x01, 0x01, 0xe5, 0x18, 0x03, 0x01, 0x01, 0xf4, 0x18,
  0x03, 0x01, 0x02, 0x03, 0x18, 0x03, 0x01, 0x02, 0x12, 0x18, 0x03, 0x01,
  0x02, 0x26, 0x08, 0x03, 0x01, 0x02, 0x35, 0x24, 0x03, 0x01, 0x02, 0x44,
  0x18, 0x03, 0x01, 0x02, 0x53, 0x10, 0x03, 0x01, 0x02, 0x62, 0x18, 0x03,
  0x01, 0x02, 0x71, 0x0c, 0x03, 0x01, 0x02, 0x94, 0x0a, 0x09, 0x02
};
unsigned int data_levels_1_dat_len = 191;
unsigned char data_levels_2_dat[] = {
  0x1c, 0x00, 0x64, 0x0a, 0x0a, 0x02, 0x00, 0x70, 0x0a, 0x0a, 0x02, 0x00,
  0x7c, 0x0a, 0x0a, 0x02, 0x00, 0x88, 0x0a, 0x0a, 0x02, 0x00, 0x94, 0x0a,
  0x0a, 0x02, 0x00, 0xa0, 0x0a, 0x0a, 0x02, 0x00, 0xac, 0x0a, 0x0a, 0x02,
  0x00, 0xb8, 0x0a, 0x0a, 0x02, 0x00, 0xc4, 0x0a, 0x0a, 0x02, 0x00, 0xd0,
  0x0a, 0x0a, 0x02, 0x00, 0xfa, 0x1a, 0x0c, 0x00, 0x01, 0x0e, 0x1a, 0x0c,
  0x00, 0x01, 0x22, 0x1a, 0x0c, 0x00, 0x01, 0x36, 0x1a, 0xff, 0x01, 0x01,
  0x68, 0x12, 0x00, 0x01, 0x01, 0x77, 0x0e, 0x00, 0x01, 0x01, 0x77, 0x16,
  0x00, 0x01, 0x01, 0x86, 0x0a, 0x00, 0x01, 0x01, 0x86, 0x1a, 0x00, 0x01,
  0x01, 0xae, 0x12, 0x00, 0x01, 0x01, 0xbd, 0x0e, 0x00, 0x01, 0x01, 0xbd,
  0x16, 0x00, 0x01, 0x01, 0xcc, 0x0a, 0x00, 0x01, 0x01, 0xcc, 0x1a, 0x00,
  0x01, 0x01, 0xf4, 0x0a, 0x0b, 0x01, 0x01, 0xf4, 0x18, 0x0b, 0x01, 0x02,
  0x26, 0x10, 0x0d, 0x02, 0x02, 0xbc, 0x07, 0x0e, 0x02
};
unsigned int data_levels_2_dat_len = 141;
unsigned char data_levels_3_dat[] = {
  0x2a, 0x00, 0x64, 0x0c, 0x0f, 0x01, 0x00, 0x73, 0x0a, 0x0f, 0x01, 0x00,
  0x82, 0x0a, 0x0f, 0x01, 0x00, 0x91, 0x0a, 0x0f, 0x01, 0x00, 0xa0, 0x0a,
  0x0f, 0x01, 0x00, 0xc8, 0x0a, 0x10, 0x02, 0x00, 0xd7, 0x0a, 0x10, 0x02,
  0x00, 0xe6, 0x0a, 0x10, 0x02, 0x00, 0xf5, 0x0a, 0x10, 0x02, 0x01, 0x04,
  0x0a, 0x10, 0x02, 0x01, 0x2c, 0x20, 0x11, 0x00, 0x01, 0x3b, 0x20, 0x11,
  0x00, 0x01, 0x4a, 0x20, 0x11, 0x00, 0x01, 0x59, 0x20, 0x11, 0x00, 0x01,
  0x68, 0x20, 0x11, 0x00, 0x01, 0x90, 0x18, 0x12, 0x01, 0x01, 0xae, 0x10,
  0x12, 0x01, 0x01, 0xbd, 0x10, 0x12, 0x01, 0x01, 0xcc, 0x10, 0x12, 0x01,
  0x01, 0xea, 0x20, 0x12, 0x01, 0x01, 0xf9, 0x20, 0x12, 0x01, 0x02, 0x17,
  0x0e, 0x12, 0x01, 0x02, 0x26, 0x0e, 0x12, 0x01, 0x02, 0x58, 0x1a, 0xff,
  0x01, 0x02, 0x76, 0x13, 0x13, 0x01, 0x02, 0x85, 0x18, 0x13, 0x01, 0x02,
  0x94, 0x1d, 0x13, 0x01, 0x02, 0xa3, 0x13, 0x13, 0x01, 0x02, 0xb2, 0x1d,
  0x13, 0x01, 0x02, 0xc1, 0x1d, 0x14, 0x02, 0x02, 0xd0, 0x1d, 0x14, 0x02,
  0x02, 0xdf, 0x1d, 0x14, 0x02, 0x02, 0xee, 0x1d, 0x14, 0x02, 0x02, 0xfd,
  0x1d, 0x14, 0x02, 0x03, 0x0c, 0x1d, 0x14, 0x02, 0x03, 0x1b, 0x1d, 0x14,
  0x02, 0x03, 0x2a, 0x1d, 0x14, 0x02, 0x03, 0x39, 0x1d, 0x14, 0x02, 0x03,
  0x5c, 0x0a, 0x01, 0x02, 0x03, 0x70, 0x0a, 0x01, 0x02, 0x03, 0x84, 0x0a,
  0x01, 0x02, 0x03, 0xac, 0x06, 0x15, 0x02
};
unsigned int data_levels_3_dat_len = 211;
unsigned char data_levels_4_dat[] = {
  0x30, 0x00, 0x64, 0x1e, 0x16, 0x01, 0x00, 0x69, 0x23, 0x17, 0x00, 0x00,
  0x6e, 0x1e, 0x16, 0x01, 0x00, 0x73, 0x23, 0x17, 0x00, 0x00, 0x78, 0x1e,
  0x16, 0x01, 0x00, 0x7d, 0x23, 0x17, 0x00, 0x00, 0x82, 0x1e, 0x16, 0x01,
  0x00, 0x87, 0x23, 0x17, 0x00, 0x00, 0x8c, 0x1e, 0x16, 0x01, 0x00, 0x91,
  0x23, 0x17, 0x00, 0x00, 0xb4, 0x14, 0x18, 0x02, 0x01, 0x5e, 0x1c, 0xff,
  0x01, 0x01, 0x90, 0x0d, 0x0a, 0x02, 0x01, 0x9f, 0x0d, 0x0a, 0x02, 0x01,
  0xae, 0x0d, 0x0a, 0x02, 0x01, 0xbd, 0x0d, 0x0a, 0x02, 0x01, 0xcc, 0x0d,
  0x0a, 0x02, 0x01, 0xdb, 0x0d, 0x0a, 0x02, 0x01, 0xea, 0x0d, 0x0a, 0x02,
  0x01, 0xf9, 0x0d, 0x0a, 0x02, 0x02, 0x26, 0x17, 0x00, 0x01, 0x02, 0x3a,
  0x11, 0x00, 0x01, 0x02, 0x3a, 0x1d, 0x00, 0x01, 0x02, 0x8a, 0x17, 0x00,
  0x01, 0x02, 0x9e, 0x11, 0x00, 0x01, 0x02, 0x9e, 0x1d, 0x00, 0x01, 0x02,
  0xd0, 0x0d, 0x19, 0x02, 0x02, 0xd0, 0x21, 0x19, 0x00, 0x02, 0xda, 0x0d,
  0x19, 0x02, 0x02, 0xda, 0x21, 0x19, 0x00, 0x02, 0xe4, 0x0d, 0x19, 0x02,
  0x02, 0xe4, 0x21, 0x19, 0x00, 0x02, 0xee, 0x0d, 0x19, 0x02, 0x02, 0xee,
  0x21, 0x19, 0x00, 0x02, 0xf8, 0x0d, 0x19, 0x02, 0x02, 0xf8, 0x21, 0x19,
  0x00, 0x03, 0x20, 0x0d, 0x1a, 0x02, 0x03, 0x2f, 0x0d, 0x1a, 0x02, 0x03,
  0x3e, 0x0d, 0x1a, 0x02, 0x03, 0x4d, 0x0d, 0x1a, 0x02, 0x03, 0x5c, 0x0d,
  0x1a, 0x02, 0x03, 0x6b, 0x0d, 0x1a, 0x02, 0x03, 0x9d, 0x21, 0x1b, 0x00,
  0x03, 0xac, 0x21, 0x1b, 0x00, 0x03, 0xbb, 0x21, 0x1b, 0x00, 0x03, 0xca,
  0x21, 0x1b, 0x00, 0x03, 0xe8, 0x10, 0x1c, 0x02, 0x04, 0xb0, 0x0d, 0x1d,
  0x02
};
unsigned int data_levels_4_dat_len = 241;
unsigned char data_levels_5_dat[] = {
  0x4c, 0x00, 0x64, 0x1c, 0x01, 0x01, 0x00, 0x78, 0x18, 0x01, 0x01, 0x00,
  0x8c, 0x14, 0x01, 0x01, 0x00, 0xa0, 0x10, 0x01, 0x01, 0x00, 0xb4, 0x0d,
  0x1e, 0x02, 0x00, 0xc8, 0x0d, 0x1e, 0x02, 0x00, 0xdc, 0x0d, 0x1e, 0x02,
  0x00, 0xf0, 0x0d, 0x1e, 0x02, 0x01, 0x04, 0x1c, 0x01, 0x01, 0x01, 0x18,
  0x18, 0x01, 0x01, 0x01, 0x2c, 0x14, 0x01, 0x01, 0x01, 0x40, 0x10, 0x01,
  0x01, 0x01, 0x54, 0x10, 0xff, 0x01, 0x01, 0xb8, 0x21, 0x1f, 0x00, 0x01,
  0xcc, 0x1e, 0x1f, 0x00, 0x01, 0xe0, 0x1b, 0x1f, 0x00, 0x01, 0xf4, 0x18,
  0x1f, 0x00, 0x02, 0x1c, 0x0d, 0x20, 0x01, 0x02, 0x1c, 0x23, 0x06, 0x00,
  0x02, 0x30, 0x0d, 0x20, 0x01, 0x02, 0x30, 0x13, 0xff, 0x01, 0x02, 0x30,
  0x20, 0x06, 0x00, 0x02, 0x44, 0x0d, 0x20, 0x01, 0x02, 0x44, 0x1d, 0x06,
  0x02, 0x02, 0x80, 0x0d, 0x19, 0x02, 0x02, 0x80, 0x21, 0x19, 0x00, 0x02,
  0x94, 0x0d, 0x19, 0x02, 0x02, 0x94, 0x21, 0x19, 0x00, 0x02, 0xa8, 0x0d,
  0x19, 0x02, 0x02, 0xa8, 0x21, 0x19, 0x00, 0x02, 0xbc, 0x21, 0x0f, 0x02,
  0x02, 0xe4, 0x17, 0x21, 0x00, 0x02, 0xec, 0x1d, 0x21, 0x00, 0x02, 0xf4,
  0x1f, 0x21, 0x02, 0x02, 0xfc, 0x19, 0x21, 0x02, 0x03, 0x04, 0x13, 0x21,
  0x02, 0x03, 0x0c, 0x0d, 0x21, 0x02, 0x03, 0x66, 0x1f, 0x22, 0x02, 0x03,
  0x70, 0x19, 0x22, 0x02, 0x03, 0x7a, 0x13, 0x22, 0x02, 0x03, 0x84, 0x0d,
  0x22, 0x02, 0x03, 0xb6, 0x0d, 0x23, 0x02, 0x03, 0xb6, 0x21, 0x23, 0x00,
  0x03, 0xc5, 0x0d, 0x23, 0x02, 0x03, 0xc5, 0x21, 0x23, 0x00, 0x03, 0xd4,
  0x0d, 0x23, 0x02, 0x03, 0xd4, 0x21, 0x23, 0x00, 0x03, 0xe3, 0x0d, 0x23,
  0x02, 0x03, 0xe3, 0x21, 0x23, 0x00, 0x04, 0x06, 0x10, 0xff, 0x01, 0x04,
  0x38, 0x0d, 0x24, 0x01, 0x04, 0x56, 0x0d, 0x25, 0x02, 0x04, 0x74, 0x0d,
  0x25, 0x02, 0x04, 0xb0, 0x1f, 0x26, 0x02, 0x04, 0xba, 0x19, 0x26, 0x02,
  0x04, 0xc4, 0x13, 0x26, 0x02, 0x04, 0xce, 0x0d, 0x26, 0x02, 0x04, 0xec,
  0x0d, 0x23, 0x02, 0x04, 0xec, 0x21, 0x23, 0x00, 0x04, 0xfb, 0x0d, 0x23,
  0x02, 0x04, 0xfb, 0x21, 0x23, 0x00, 0x05, 0x0a, 0x0d, 0x23, 0x02, 0x05,
  0x0a, 0x21, 0x23, 0x00, 0x05, 0x19, 0x0d, 0x23, 0x02, 0x05, 0x19, 0x21,
  0x23, 0x00, 0x05, 0x3c, 0x0d, 0x27, 0x02, 0x05, 0x50, 0x21, 0x27, 0x00,
  0x05, 0x64, 0x0d, 0x27, 0x02, 0x05, 0x78, 0x21, 0x27, 0x00, 0x05, 0x8c,
  0x0d, 0x27, 0x02, 0x05, 0xa0, 0x21, 0x27, 0x00, 0x05, 0xb4, 0x0d, 0x27,
  0x02, 0x05, 0xc8, 0x21, 0x27, 0x00, 0x05, 0xdc, 0x0d, 0x27, 0x02, 0x05,
  0xf0, 0x21, 0x27, 0x00, 0x06, 0x0e, 0x0d, 0x28, 0x02
};

unsigned int data_levels_5_dat_len = 381;
// Struct to hold binary data pointers
typedef struct {
    const uint8_t id;
    const uint8_t * const data;
} LevelData;

static const LevelData levels[] = {
    {.id = 0, .data = data_levels_0_dat},
    {.id = 1, .data = data_levels_1_dat},
    {.id = 2, .data = data_levels_2_dat},
    {.id = 3, .data = data_levels_3_dat},
    {.id = 4, .data = data_levels_4_dat},
    {.id = 5, .data = data_levels_5_dat},
};

const uint8_t *getLevelData(uint8_t id) {
    for (unsigned int i = 0; i < sizeof(levels) / sizeof(LevelData); i++) {
        if (levels[i].id == id) {
            return levels[i].data;
        }
    }
    return NULL;
}
